package com.bwie.controller;

import com.bwie.pojo.TbProject;
import com.bwie.service.TbProjectService;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/project/project")
public class TbProjectController {
    @Autowired
    TbProjectService tbProjectService;

    @PostMapping("/add")
    public R add() {
        return null;
    }
    @PostMapping("/delete")
    public R delete() {
        return null;
    }
    @PostMapping("/TbBrandById/{id}")
    public R TbBrandById(@PathVariable Integer id) {
        return tbProjectService.TbBrandById(id);
    }
    @PostMapping("/saveTbProject")
    public R saveTbProject(@RequestBody TbProject tbProject) {
        return tbProjectService.saveTbProject(tbProject);
    }
    @PostMapping("/TbPlusCarList")
    public R TbPlusCarList() {
        return tbProjectService.TbPlusCarList();
    }
    @PostMapping("/TbAddrList")
    public R TbAddrList() {
        return tbProjectService.TbAddrList();
    }
    @PostMapping("/TbProjectList")
    public R TbProjectList(@RequestBody PageInfoVo pageInfoVo) {
        return tbProjectService.TbProjectList(pageInfoVo);
    }
    @PostMapping("/TbStatusList")
    public R TbStatusList() {
        return tbProjectService.TbStatusList();
    }
    @PostMapping("/echoTbProject/{id}")
    public R echoTbProject(@PathVariable Integer id) {
        return tbProjectService.echoTbProject(id);
    }
    @PostMapping("/updateTbProject")
    public R updateTbProject(@RequestBody TbProject tbProject) {
        return tbProjectService.updateTbProject(tbProject);
    }
    @PostMapping("/examine/{id}")
    public R examine(@PathVariable Integer id) {
        return tbProjectService.examine(id);
    }
    @PostMapping("/upload")
    public R upload(MultipartFile file) {
        return tbProjectService.upload(file);
    }
}
